import Vue from "vue";
import VueRouter from "vue-router";
import routes from "./routers";

Vue.use(VueRouter);

const router = new VueRouter({
  routes,
});

export default router;

// 全局前置守卫
router.beforeEach((to, from, next) => {
  // 正常路由
  next();
});
// 全局后置守卫
router.afterEach(() => {
  // NProgress.done();
});
